home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_0799 / 460 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  2.5 KB

  1. From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
  2. Date: Mon, 30 Aug 93 11:06:46 +0200
  3. Message-Id: <9308300906.AA09406@issan.informatik.uni-dortmund.de>
  4. To: mint@atari.archive.umich.edu
  5. In-Reply-To: <428.9308261557@earth.ox.ac.uk> (message from Stephen Usher on Thu, 26 Aug 1993 16:57:28 +0100 (BST))
  6. Subject: Re: Bug report. MiNT 1.07.
  7.  
  8. >>>>> Stephen Usher <steve@earth.ox.ac.uk> writes:
  9. |>  (2) When MiNT is rebooted after successfully exiting, system soft-crashes.
  10.  
  11. |>  When MiNT is restarted after it has exited the following happens:-
  12.  
  13. |>  In TT-Med or TT-Low resolution bottom couple of lines of screen are
  14. |>  corrupted. Programs which are then run under MiNT die with access violations
  15. |>  if they run in ST-RAM. Sometimes the whole machine freezes.
  16.  
  17. |>  In other resolutions (ie standard ST resolutions) the screen memory isn't
  18. |>  corrupted but the system dies as above.
  19.  
  20. I had similar problems, and i tracked it down to the following:
  21.  
  22. When the screen is set up, it is moved to a 8K boundary, which is
  23. usually less than the initial address. This must be undone when mint
  24. exits, otherwise it overlaps with free memory.
  25.  
  26. --- orig/debug.c    Tue Aug 17 21:23:20 1993
  27. +++ debug.c    Tue Aug 17 21:30:52 1993
  28. @@ -564,6 +564,7 @@
  29.              close_filesys();
  30.              if (!no_mem_prot)
  31.                  restr_mmu();
  32. +            restr_screen ();
  33.              (void)Super((void *)tosssp);    /* gratuitous (void *) for Lattice */
  34.  #ifdef PROFILING
  35.              _exit(0);
  36. --- orig/main.c    Fri Aug  6 17:58:20 1993
  37. +++ main.c    Fri Aug 13 21:00:40 1993
  38. @@ -916,6 +916,7 @@
  39.      close_filesys();
  40.      if (!no_mem_prot)
  41.          restr_mmu();
  42. +    restr_screen ();
  43.  
  44.      (void)Super((void *)tosssp);    /* gratuitous (void *) for Lattice */
  45.      Cconws("leaving MiNT\r\n");
  46. --- orig/mem.c    Tue Aug 17 21:23:24 1993
  47. +++ mem.c    Tue Aug 17 22:02:26 1993
  48. @@ -111,6 +111,33 @@
  49.      }
  50.  }
  51.  
  52. +void
  53. +restr_screen ()
  54. +{
  55. +  long base = (long) Physbase ();
  56. +  MEMREGION *r;
  57. +
  58. +  if (base != scrnplace)
  59. +    {
  60. +      for (r = *core; r; r = r->next)
  61. +    {
  62. +      if (ISFREE (r) && r->len >= scrnsize)
  63. +        break;
  64. +    }
  65. +      if (r)
  66. +    {
  67. +      quickmove ((char *) r->loc, (char *) base, scrnsize);
  68. +      Setscreen ((void *) r->loc, (void *) r->loc, -1);
  69. +      Vsync ();
  70. +      quickmove ((char *) scrnplace, (char *) r->loc, scrnsize);
  71. +    }
  72. +      else
  73. +    quickmove ((char *) scrnplace, (char *) base, scrnsize);
  74. +      Setscreen ((void *) scrnplace, (void *) scrnplace, -1);
  75. +      Cconws ("\r\n"); 
  76. +    }
  77. +}
  78. +
  79.  /*
  80.   * init_core(): initialize the core memory map (normal ST ram) and also
  81.   * the alternate memory map (fast ram on the TT)
  82.